/*
 * @description: 
 * @Author: vikingShip
 * @Date: 2021-11-03 11:36:25
 * @LastEditors: vikingShip
 * @LastEditTime: 2021-12-31 16:43:45
 */
import store from '@/store'
export default (errRes: { code: number, msg: string }) => {
  switch (errRes.code) {
    case 300007:
      return errRes.msg;
      break;
    case 3:
      // uni.clearStorageSync();
      return errRes.msg;
      // wx.reLaunch({ url: "/pages/index/index" });
      break;
    case 7:
      uni.showToast({
        title:"账号异地登录",
        icon:"none",
        duration:1500,
        success:()=>{
          store.dispatch('userStore/deleteToken')
          uni.reLaunch({
            url:"/pages/index/index"
          })
        }
      })

    break 
    default:
      return errRes.msg;
  }
};
